package leetcode;

public class Solution206_2 {
    // 递归写法
    public ListNode206 reverseList(ListNode206 head){

        if(head == null || head.next == null)
            return head;

        ListNode206 rev = reverseList(head.next);
        head.next.next = head;
        head.next = null;
        return rev;
    }
}
